#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int>arr(n);
    for (int i = 0; i < n; i++)
        cin >> arr[i];

    vector<int> sum;
    for (int i = 0; i < n; i++)
    {
        for (int j = i + 1; j < n; j++)
        {
            int x = arr[i] + arr[j];
            sum.push_back(x);
        }
    }
    sort(sum.begin(), sum.end());
    int i;
    for (i = 0; i < sum.size() - 1; i++)
        cout << sum[i] << " ";
    cout << sum[i];
}